package com.aiyige.model.request;

import com.aiyige.base.api.ApiManager;

import okhttp3.ResponseBody;
import retrofit2.Call;

/**
 * Created by xiachao
 */

public class GetCustomerListRequest {
    String order_engine;
    String type;
    String filters;
    String pageNum;
    String pageSize  = "10";
    String keyWord;

    private GetCustomerListRequest(Builder builder) {
        setOrder_engine(builder.order_engine);
        setType(builder.type);
        setFilters(builder.filters);
        setPageNum(builder.pageNum);
        setPageSize(builder.pageSize);
        setKeyWord(builder.keyWord);
    }

    public static Builder newBuilder() {
        return new Builder();
    }

    public String getOrder_engine() {
        return order_engine;
    }

    public void setOrder_engine(String order_engine) {
        this.order_engine = order_engine;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getFilters() {
        return filters;
    }

    public void setFilters(String filters) {
        this.filters = filters;
    }

    public String getPageNum() {
        return pageNum;
    }

    public void setPageNum(String pageNum) {
        this.pageNum = pageNum;
    }

    public String getPageSize() {
        return pageSize;
    }

    public void setPageSize(String pageSize) {
        this.pageSize = pageSize;
    }

    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    public static final class Builder {
        private String order_engine;
        private String type;
        private String filters;
        private String pageNum;
        private String pageSize = "10";
        private String keyWord;

        private Builder() {
        }

        public Builder order_engine(String order_engine) {
            this.order_engine = order_engine;
            return this;
        }

        public Builder type(String type) {
            this.type = type;
            return this;
        }

        public Builder filters(String filters) {
            this.filters = filters;
            return this;
        }

        public Builder pageNum(String pageNum) {
            this.pageNum = pageNum;
            return this;
        }

        public Builder pageSize(String pageSize) {
            this.pageSize = pageSize;
            return this;
        }

        public Builder keyWord(String keyWord) {
            this.keyWord = keyWord;
            return this;
        }

        public Call<ResponseBody> build() {
            return ApiManager.getService().getCustomerList(order_engine, type, keyWord, filters, pageNum, pageSize);
        }
    }


}
